﻿using System.Collections.Generic;
using mBlog.Models;

namespace mBlog.Services
{
    public interface IPostService
    {
        Post First();
        Post Single(long id);
        Post Single(string urlName);

        void Add(Post post);
        void Update(Post post);
        void Delete(long postId);

        //void UpdateCategory(long postId, IList<Category> newCategories);

        void AddTags(long postId, IList<string> tags);
        void DeleteTag(long postId, long tagId);

        void AddComment(long postId, Comment comment);
        void DeleteComment(long commentId);

        int Count(bool? includeUnPublished = null);
        IList<Post> Get(int? page, int itemsPerPage);
        IList<Post> GetByCategory(string categoryUrlName, int? page, int itemsPerPage);
        IList<Post> GetByTag(string tagUrlName, int? page, int itemsPerPage);
        IList<Post> GetByDate(short year, short month, int? page, int itemsPerPage);

        IList<Comment> GetRecentComment(int itemsToTake);
    }
}
